package cn.itcast.myapplication.room;


import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
@Entity
public class Word {
    @PrimaryKey(autoGenerate = true)//自动生成
    private int id;//ID
    /**
     *
     *   @ColumnInfo() 列的名称便于记忆，不写的话也可以它就以这个变量名称作为这个ColumnInfo 但最好是写
     *
     * */
    @ColumnInfo(name = "english_word")
    private String word;

    @ColumnInfo(name="chinese_meaning")
    private String chineseMeaning;

    @ColumnInfo(name ="chinese_invisible")
    private boolean chineseInvisible;

    public boolean isChineseInvisible() {
        return chineseInvisible;
    }

    public void setChineseInvisible(boolean chineseInvisible) {
        this.chineseInvisible = chineseInvisible;
    }

    public Word(String word, String chineseMeaning) {

        this.word = word;

        this.chineseMeaning = chineseMeaning;

    }


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getWord() {
        return word;
    }

    public void setWord(String word) {
        this.word = word;
    }

    public String getChineseMeaning() {
        return chineseMeaning;
    }

    public void setChineseMeaning(String chineseMeaning) {
        this.chineseMeaning = chineseMeaning;
    }
}
